package com.luisliuyi.demo.binder;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.luisliuyi.demo.binderlib.core.BinderIPC;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        BinderIPC.getDefault().open(this);

        //服务注册
        BinderIPC.getDefault().register(Singlton.class);
        Singlton.getInstance().setUserInfo(new UserInfo("123456","luis"));
    }

    public void change(View view) {
        startActivity(new Intent(this, SecondActivity.class));
    }
}
